package com.rock.securityresearch.common

enum TimePeriod {
    case Daily
    case Weekly
    case Monthly
    case Yearly
}
object TimePeriod {
    def apply(period: String, default: TimePeriod = TimePeriod.Daily): TimePeriod = {
        period match
            case "Daily" => TimePeriod.Daily
            case "Weekly" => TimePeriod.Weekly
            case "Monthly" => TimePeriod.Monthly
            case "Yearly" => TimePeriod.Yearly
            case _ => default
    }
}